package mt.comm;

import java.io.Serializable;

import mt.Order;

public class ClientSideMessageImpl implements ClientSideMessage, Serializable {

	private static final long serialVersionUID = -4656975618857583697L;
	private Type type;
	private Order order;
	private String error;

	/**
	 * @param type
	 *            Type of the message.
	 * @param order
	 *            The {@link Order} in the message.
	 * @param error
	 *            The error message.
	 */
	public ClientSideMessageImpl(Type type, Order order, String error) {
		super();
		this.type = type;
		this.order = order;
		this.error = error;
	}

	/**
	 * @param type
	 *            Type of the message.
	 * @param order
	 *            The {@link Order} in the message.
	 */
	public ClientSideMessageImpl(Type type, Order order) {
		super();
		this.type = type;
		this.order = order;
	}

	/**
	 * @param type
	 *            Type of the message.
	 * @param error
	 *            The error message.
	 */
	public ClientSideMessageImpl(Type type, String error) {
		super();
		this.type = type;
		this.error = error;
	}

	@Override
	public Type getType() {
		return type;
	}

	@Override
	public Order getOrder() {
		return order;
	}

	@Override
	public String getError() {
		return error;
	}

}
